﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AppToolkit.WPF.Services
{
    /// <summary>
    /// Provides the service to visualize an exception in a generic dialog.
    ///  </summary>
    /// <remarks>
    /// To have the corresponding dialog parented correctly, export the application's main window
    /// using following contract <see cref="ContractDefinitions.MainWindow"/>.
    /// </remarks>
    public interface IErrorDisplay
    {
        /// <summary>
        /// Show the exception in a specific dialog.
        /// </summary>
        /// <remarks>If the user chooses to Ignore the exception, it is swallowed, otherwise it is
        /// rethrown through the ShowException method.</remarks>
        /// <param name="ex">exception to display.</param>
        /// <param name="owner">[opt.] if set, specifies the parent window.</param>
        void ShowException(Exception ex, System.Windows.Window owner = null);
    }
}